const app = getApp()
const promisify = require("../../utils/promisify")

Page({
  data: {
    headlines: [],
    news: []
  },
  onLoad: function (options) {
    let that = this
    promisify(wx.request)({
      url: "https://www.lional.club:6001/news.json",
      method: "GET",
    }).then(
      data => {
        that.setData({
          headlines: data.data.headlines,
          news: data.data.news
        })
      }
    )
  },

})